package cn.app.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.app.dao.dev_user.DevUserDao;
import cn.app.entity.DevUser;
import cn.app.service.DevUserService;
@Service
@Transactional
public class DevUserServiceImpl implements DevUserService {
	
	@Autowired
	private DevUserDao devUserDao;

	@Override
	public DevUser login(String devcode, String devpassword) {
		//根据用户名查询DevUser对象
		DevUser devUser = devUserDao.findDevUserByDevCode(devcode);
		//判断用户名是否存在
		if(devUser != null){
			if(devpassword.equals(devUser.getDevpassword())){
				return devUser;
			}
		}
		return null;
	}
	
	
	
}
